package com.nexus.all.dto;

import com.nexus.bean.annotation.valid.AddGroup;
import com.nexus.bean.annotation.valid.OtherGroup;
import com.nexus.bean.annotation.valid.UpdateGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import javax.validation.constraints.NotBlank;

/**
 * @author zxt
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString(callSuper = true)
@ApiModel("用户入参")
public class UserUpdateDTO {

    @ApiModelProperty("旧用户密码")
    @NotBlank(message = "旧密码不能为空", groups = AddGroup.class)
    private String oldPassword;


    @ApiModelProperty("用户密码")
    @NotBlank(message = "新密码不能为空", groups = AddGroup.class)
    private String password;

    @ApiModelProperty(value = "用户id",hidden = true)
    private Long userId;

    @ApiModelProperty("头像url")
    @NotBlank(message = "请选择头像", groups = UpdateGroup.class)
    private String avatarUrl;

    @ApiModelProperty("用户昵称")
    @NotBlank(message = "用户昵称不能为空", groups = OtherGroup.class)
    private String nickName;

    @ApiModelProperty("邮箱")
    @NotBlank(message = "邮箱不能为空", groups = OtherGroup.class)
    private String email;

}
